<?php
namespace app\admin\validate;

use think\Validate;

class Student extends Validate
{
    // 验证规则
    protected $rule = [
        ['grade', 'require|number', '年级必填|年级必须是数字格式'],
        ['class', 'require|number', '班级必填|班级必须是数字格式'],
        ['stu_no', 'require|unique:student', '学号必填|学号已经存在'],
        ['stu_name', 'require|token', '姓名必填'],
        ['gender', 'require', '性别必填'],
        ['stu_password', 'require', '密码必填'],
    ];
}